﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PFI.SCHVN;
using System.Collections;


namespace Utils.RamDevice
{
    public static partial class RAM
    {
        public static class CletchingCombinations
        {
        static Hashtable hshUp, hshDown;

        static CletchingCombinations()
        {
            hshUp = new Hashtable();
            hshDown = new Hashtable();
        }

        public static void ClearCletchingCombinations()
        {
            hshUp.Clear();
            hshDown.Clear();
        }
        public static void AddCletchingCombinationUp(double key, int[] value)
        {
            hshUp.Add(key, value);
        }
        public static bool isCletchingCombinationsUp(double toFind)
        {
            return hshUp.ContainsKey(toFind);
        }
        public static int[] GetCletchingCombinationUp(double toFind)
        {
            if (hshUp.ContainsKey(toFind))
            {
                return hshUp[toFind] as int[];
            }
            else
                throw new Exception();
        }
        public static void AddCletchingCombinationDown(double key, int[] value)
        {
            hshDown.Add(key, value);
        }
        public static bool isCletchingCombinationsDown(double toFind)
        {
            return hshDown.ContainsKey(toFind);
        }
        public static int[] GetCletchingCombinationDown(double toFind)
        {
            if (hshDown.ContainsKey(toFind))
            {
                return hshDown[toFind] as int[];
            }
            else
                throw new Exception();
        }
        }
    }
}
